package com.jiwei.system.pojo;

import com.alibaba.fastjson.JSONArray;
import org.hibernate.validator.constraints.Length;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @title: Task
 * @Author 赖志宇
 * @Description 任务实体类
 * @Date: 2020/8/14
 * @Version 1.0
 */
public class Task implements Serializable {
    private String id;
    @NotBlank(message = "称呼不能为空")
    private String nickname;
    @NotBlank(message = "性别不能为空")
    private String sex;
   // @Length(min=11,max = 11,message = "手机号码长度不为11位")
    private String telephone;
    @NotBlank(message = "地址不能为空")
    private String address;
    @NotBlank(message = "描述不能为空")
    private String description;
    @NotBlank(message = "电脑类型不能为空")
    private String computerType;
    private String status;
    @NotBlank(message = "维修方式不能为空")
    private String repairMethod;
    private String startDate;
    private String endDate;
    private List<String> idList;
    private List<String> nameList;
//    private List<String> logList;
    private JSONArray taskLog;
    private List<MultipartFile> files;
    //用于接收数据库映射的url
    private List<String> pictureUrl;


    public Task() {
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return nickname;
    }

    public String getSex() {
        return sex;
    }

    public String getTelephone() {
        return telephone;
    }

    public String getAddress() {
        return address;
    }

    public String getDescription() {
        return description;
    }

    public String getComputerType() {
        return computerType;
    }

    public String getStatus() {
        return status;
    }

    public String getRepairMethod() {
        return repairMethod;
    }

    public String getStartDate() {
        return startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.nickname = name;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setComputerType(String computerType) {
        this.computerType = computerType;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public void setRepairMethod(String repairMethod) {
        this.repairMethod = repairMethod;
    }

    public List<String> getNameList() {
        return nameList;
    }

    public void setNameList(List<String> nameList) {
        this.nameList = nameList;
    }

    public List<String> getIdList() {
        return idList;
    }

    public void setIdList(List<String> idList) {
        this.idList = idList;
    }

    public JSONArray getTaskLog() {
        return taskLog;
    }

    public void setTaskLog(JSONArray taskLog) {
        this.taskLog = taskLog;
    }

    public List<MultipartFile> getFiles(){return files;}

    public void setFiles(List<MultipartFile> files) {
        this.files = files;
    }

    public List<String> getPictureUrl() {return pictureUrl;}

    public void setPictureUrl(List<String> pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    @Override
    public String toString() {
        return "Task{" +
                "id='" + id + '\'' +
                ", name='" + nickname + '\'' +
                ", sex='" + sex + '\'' +
                ", telephone='" + telephone + '\'' +
                ", address='" + address + '\'' +
                ", description='" + description + '\'' +
                ", computerType='" + computerType + '\'' +
                ", status='" + status + '\'' +
                ", repairMethod='" + repairMethod + '\'' +
                ", files='" + files + '\'' +
                ", pictureUrl='" + pictureUrl + '\'' +
                ", endDate='" + endDate + '\'' +
                '}';
    }
}

